package edu.uoc.tdp.pac3.beans;

import java.io.Serializable;
import java.sql.Date;
import java.text.DateFormat;
import java.text.SimpleDateFormat;

public class Resource implements Serializable {
	private static final long serialVersionUID = 1L;
	private int idResource;
	private String name;
	private int stockQuantity;
	private Date lastStockInput;
	private Date lastStockOutput;
	private final DateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");

	
	public Resource() {
		super();
	}
	
	Resource(String name, int quantity, Date lastInput, Date lastOutput) {
		super();
		this.name = name;
		this.stockQuantity = quantity;
		this.lastStockInput = lastInput;
		this.lastStockOutput = lastOutput;
	}

	public int getIdResource() {
		return idResource;
	}

	public void setIdResource(int idResource) {
		this.idResource = idResource;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getStockQuantity() {
		return stockQuantity;
	}

	public void setStockQuantity(int stockQuantity) {
		this.stockQuantity = stockQuantity;
	}

	public Date getLastStockInput() {
		return lastStockInput;
	}

	public void setLastStockInput(Date lastStockInput) {
		this.lastStockInput = lastStockInput;
	}

	public Date getLastStockOutput() {
		return lastStockOutput;
	}

	public void setLastStockOutput(Date lastStockOutput) {
		this.lastStockOutput = lastStockOutput;
	}

	public DateFormat getSdf() {
		return sdf;
	}
	
}
